<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title></title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<script type="text/javascript" src="../js/jquery-1.8.0.js"></script> 
<link rel="stylesheet" type="text/css" href="../css/maintable.css" ></link>

<script>
	$(function(){
		 $("tr").mouseover(function(){
	  	  		$(this).css("background","#d3eaef").siblings().css("background","white");
	  	 })
	});
</script>
</head>

<body>
	<div class ="div_title">
			<div class="div_titlename"> <img src="../images/san_jiao.gif" ><span>管理人员基本信息列表</span></div>
	 </div>
	 
	 <form action="RoleServlet.do?flag=listadmin"  name="form1" method="post">
	
	 <table class="main_table" id="table1">
	       <tr>
	 				<th>账号</th> 	
	 				<th>状态</th>	
	 				<th>用户角色</th>  
	 				<th>最后更新日期</th> 	
	 				<th>操作</th>
	 		</tr>
	 		<c:forEach var="u" items="${list}">
	          <tr>
		           <td>${u.adminName}</td>
		           <td>${u.state==1?"正常":"异常"}</td>
		           <td>${u.roleName}</td>
		           <td><fmt:formatDate value="${u.editDate}" pattern="yyyy/MM/dd HH:mm:ss"/></td>
		          <td>
		           <a id=zy href="RoleServlet.do?flag=goto_role_admin&adminid=${u.id}">角色分配</a> 
		          </td>
	          </tr>
	         </c:forEach>
	</table>
	
	
	<div class="div_page" >
		  <div class="div_page_left">    共有 <label>${page.rowCount}</label> 条记录，当前第 <label>${page.pageIndex}</label> 页，共 <label>${page.pageCount}</label> 页	</div>		
		  <div class="div_page_right" > 	 
		  			 <a href="RoleServlet.do?flag=listadmin&pageIndex=1" >首页</a>
	  	 			 <a href="RoleServlet.do?flag=listadmin&pageIndex=${page.pageIndex-1 }">上一页</a>
		  			 <a href="RoleServlet.do?flag=listadmin&pageIndex=${page.pageIndex+1 }">下一页 </a>
	  	 		   	 <a href="RoleServlet.do?flag=listadmin&pageIndex=${page.pageCount}">尾页</a>

		  <button>转到</button>
		  <input type="text" name="pageIndex" id="pageIndex" value="${page.pageIndex}"  type="number"/> 页
		</div>
			
	</div>
	</form>
</body>
</html>